<!DOCTYPE html>
<html lang="en">
  <head>
    <title>SerialDispatchQueueScheduler Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Class/SerialDispatchQueueScheduler" class="dashAnchor"></a>

    <a title="SerialDispatchQueueScheduler Class Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          RxSwift 6.1.0 Docs
        </a>
         (96% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/ReactiveX/RxSwift">
            <img class="header-icon" src="../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">RxSwift Reference</a>
      <img class="carat" src="../img/carat.png" />
      SerialDispatchQueueScheduler Class Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift.html">RxSwift</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AnyObserver.html">AnyObserver</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Binder.html">Binder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Cancelable.html">Cancelable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ConnectableObservableType.html">ConnectableObservableType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Disposable.html">Disposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/Event.html">Event</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/GroupedObservable.html">GroupedObservable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImmediateSchedulerType.html">ImmediateSchedulerType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/Observable.html">Observable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ObservableConvertibleType.html">ObservableConvertibleType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ObservableType.html">ObservableType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ObserverType.html">ObserverType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Reactive.html">Reactive</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/SchedulerType.html">SchedulerType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift%2FDisposables.html">RxSwift/Disposables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/BooleanDisposable.html">BooleanDisposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CompositeDisposable.html">CompositeDisposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CompositeDisposable.html#/s:7RxSwift19CompositeDisposableC10DisposeKeyV">– DisposeKey</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Disposables.html">Disposables</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/DisposeBag.html">DisposeBag</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/DisposeBag/DisposableBuilder.html">– DisposableBuilder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../RxSwift%2FDisposables.html#/s:7RxSwift11DisposeBaseC">DisposeBase</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/RefCountDisposable.html">RefCountDisposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ScheduledDisposable.html">ScheduledDisposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SerialDisposable.html">SerialDisposable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SingleAssignmentDisposable.html">SingleAssignmentDisposable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift%2FSchedulers.html">RxSwift/Schedulers</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ConcurrentDispatchQueueScheduler.html">ConcurrentDispatchQueueScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ConcurrentMainScheduler.html">ConcurrentMainScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CurrentThreadScheduler.html">CurrentThreadScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/HistoricalScheduler.html">HistoricalScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/HistoricalSchedulerTimeConverter.html">HistoricalSchedulerTimeConverter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/MainScheduler.html">MainScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/OperationQueueScheduler.html">OperationQueueScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SerialDispatchQueueScheduler.html">SerialDispatchQueueScheduler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/VirtualTimeConverterType.html">VirtualTimeConverterType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/VirtualTimeScheduler.html">VirtualTimeScheduler</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift%2FSubjects.html">RxSwift/Subjects</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/AsyncSubject.html">AsyncSubject</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/BehaviorSubject.html">BehaviorSubject</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/PublishSubject.html">PublishSubject</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ReplaySubject.html">ReplaySubject</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/SubjectType.html">SubjectType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift%2FTraits%2FInfallible.html">RxSwift/Traits/Infallible</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Infallible.html">Infallible</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../RxSwift%2FTraits%2FPrimitiveSequence.html">RxSwift/Traits/PrimitiveSequence</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../RxSwift%2FTraits%2FPrimitiveSequence.html#/s:7RxSwift11Completablea">Completable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../RxSwift%2FTraits%2FPrimitiveSequence.html#/s:7RxSwift5Maybea">Maybe</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/PrimitiveSequence.html">PrimitiveSequence</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../RxSwift%2FTraits%2FPrimitiveSequence.html#/s:7RxSwift6Singlea">Single</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Classes.html">Other Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ConnectableObservable.html">ConnectableObservable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Global%20Variables.html">Other Global Variables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Global%20Variables.html#/s:7RxSwift29maxTailRecursiveSinkStackSizeSivp">maxTailRecursiveSinkStackSize</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Enums.html">Other Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/CompletableEvent.html">CompletableEvent</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Enums.html#/s:7RxSwift16CompletableTraitO">CompletableTrait</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/Hooks.html">Hooks</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/InfallibleEvent.html">InfallibleEvent</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/MaybeEvent.html">MaybeEvent</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Enums.html#/s:7RxSwift10MaybeTraitO">MaybeTrait</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/RxError.html">RxError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Enums.html#/s:7RxSwift11SingleTraitO">SingleTrait</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/SubjectLifetimeScope.html">SubjectLifetimeScope</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/TakeBehavior.html">TakeBehavior</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/VirtualTimeComparison.html">VirtualTimeComparison</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Extensions.html">Other Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Extensions.html#/s:10Foundation11JSONDecoderC">JSONDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Extensions.html#/c:objc(cs)NSObject">NSObject</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Extensions.html#/s:10Foundation19PropertyListDecoderC">PropertyListDecoder</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Protocols.html">Other Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/DataDecoder.html">DataDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/EventConvertible.html">EventConvertible</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/InfallibleType.html">InfallibleType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/PrimitiveSequenceType.html">PrimitiveSequenceType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ReactiveCompatible.html">ReactiveCompatible</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Structs.html">Other Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Resources.html">Resources</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Typealiases.html">Other Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Typealiases.html#/s:7RxSwift0A15AbstractIntegera">RxAbstractInteger</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Typealiases.html#/s:7RxSwift0A4Timea">RxTime</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Typealiases.html#/s:7RxSwift0A12TimeIntervala">RxTimeInterval</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Other%20Typealiases.html#/s:7RxSwift11SingleEventa">SingleEvent</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>SerialDispatchQueueScheduler</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">SerialDispatchQueueScheduler</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/SchedulerType.html">SchedulerType</a></span></code></pre>

                </div>
              </div>
            <p>Abstracts the work that needs to be performed on a specific <code>dispatch_queue_t</code>. It will make sure 
that even if concurrent dispatch queue is passed, it&rsquo;s transformed into a serial one.</p>

<p>It is extremely important that this scheduler is serial, because
certain operator perform optimizations that rely on that property.</p>

<p>Because there is no way of detecting is passed dispatch queue serial or
concurrent, for every queue that is being passed, worst case (concurrent)
will be assumed, and internal serial proxy dispatch queue will be created.</p>

<p>This scheduler can also be used with internal serial queue alone.</p>

<p>In case some customization need to be made on it before usage,
internal serial queue can be customized using <code>serialQueueConfiguration</code>
callback.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC12TimeIntervala"></a>
                    <a name="//apple_ref/swift/Alias/TimeInterval" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC12TimeIntervala">TimeInterval</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">TimeInterval</span> <span class="o">=</span> <span class="kt">Foundation</span><span class="o">.</span><span class="kt">TimeInterval</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC4Timea"></a>
                    <a name="//apple_ref/swift/Alias/Time" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC4Timea">Time</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Time</span> <span class="o">=</span> <span class="kt">Date</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC3now10Foundation4DateVvp"></a>
                    <a name="//apple_ref/swift/Property/now" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC3now10Foundation4DateVvp">now</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">now</span><span class="p">:</span> <span class="kt">Date</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>Current time.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC08internalcE4Name06serialE13Configuration6leewayACSS_ySo17OS_dispatch_queueCcSg0D00D12TimeIntervalOtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(internalSerialQueueName:serialQueueConfiguration:leeway:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC08internalcE4Name06serialE13Configuration6leewayACSS_ySo17OS_dispatch_queueCcSg0D00D12TimeIntervalOtcfc">init(internalSerialQueueName:<wbr>serialQueueConfiguration:<wbr>leeway:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Constructs new <code>SerialDispatchQueueScheduler</code> with internal serial queue named <code>internalSerialQueueName</code>.</p>

<p>Additional dispatch queue properties can be set after dispatch queue is created using <code>serialQueueConfiguration</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">internalSerialQueueName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">serialQueueConfiguration</span><span class="p">:</span> <span class="p">((</span><span class="kt">DispatchQueue</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">leeway</span><span class="p">:</span> <span class="kt">DispatchTimeInterval</span> <span class="o">=</span> <span class="kt">DispatchTimeInterval</span><span class="o">.</span><span class="nf">nanoseconds</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>internalSerialQueueName</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Name of internal serial dispatch queue.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>serialQueueConfiguration</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Additional configuration of internal serial dispatch queue.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>leeway</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The amount of time, in nanoseconds, that the system will defer the timer.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC5queue08internalcE4Name6leewayACSo012OS_dispatch_G0C_SS0D00D12TimeIntervalOtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(queue:internalSerialQueueName:leeway:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC5queue08internalcE4Name6leewayACSo012OS_dispatch_G0C_SS0D00D12TimeIntervalOtcfc">init(queue:<wbr>internalSerialQueueName:<wbr>leeway:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Constructs new <code>SerialDispatchQueueScheduler</code> named <code>internalSerialQueueName</code> that wraps <code>queue</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">queue</span><span class="p">:</span> <span class="kt">DispatchQueue</span><span class="p">,</span> <span class="nv">internalSerialQueueName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">leeway</span><span class="p">:</span> <span class="kt">DispatchTimeInterval</span> <span class="o">=</span> <span class="kt">DispatchTimeInterval</span><span class="o">.</span><span class="nf">nanoseconds</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>queue</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Possibly concurrent dispatch queue used to perform work.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>internalSerialQueueName</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Name of internal serial dispatch queue proxy.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>leeway</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The amount of time, in nanoseconds, that the system will defer the timer.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC3qos08internalcE4Name6leewayAC0D00D3QoSV_SSAG0D12TimeIntervalOtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(qos:internalSerialQueueName:leeway:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC3qos08internalcE4Name6leewayAC0D00D3QoSV_SSAG0D12TimeIntervalOtcfc">init(qos:<wbr>internalSerialQueueName:<wbr>leeway:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Constructs new <code>SerialDispatchQueueScheduler</code> that wraps one of the global concurrent dispatch queues.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@available(macOS 10.10, *)</span>
<span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">qos</span><span class="p">:</span> <span class="kt">DispatchQoS</span><span class="p">,</span> <span class="nv">internalSerialQueueName</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"rx.global_dispatch_queue.serial"</span><span class="p">,</span> <span class="nv">leeway</span><span class="p">:</span> <span class="kt">DispatchTimeInterval</span> <span class="o">=</span> <span class="kt">DispatchTimeInterval</span><span class="o">.</span><span class="nf">nanoseconds</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>qos</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Identifier for global dispatch queue with specified quality of service class.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>internalSerialQueueName</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Custom name for internal serial dispatch queue proxy.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>leeway</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The amount of time, in nanoseconds, that the system will defer the timer.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC8schedule_6actionAA10Disposable_px_AaF_pxctlF"></a>
                    <a name="//apple_ref/swift/Method/schedule(_:action:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC8schedule_6actionAA10Disposable_px_AaF_pxctlF">schedule(_:<wbr>action:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Schedules an action to be executed immediately.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">func</span> <span class="n">schedule</span><span class="o">&lt;</span><span class="kt">StateType</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">state</span><span class="p">:</span> <span class="kt">StateType</span><span class="p">,</span> <span class="nv">action</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">StateType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Protocols/Disposable.html">Disposable</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Protocols/Disposable.html">Disposable</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>state</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>State passed to the action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>action</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>The disposable object used to cancel the scheduled action (best effort).</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC16scheduleRelative_7dueTime6actionAA10Disposable_px_0D00dJ8IntervalOAaG_pxctlF"></a>
                    <a name="//apple_ref/swift/Method/scheduleRelative(_:dueTime:action:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC16scheduleRelative_7dueTime6actionAA10Disposable_px_0D00dJ8IntervalOAaG_pxctlF">scheduleRelative(_:<wbr>dueTime:<wbr>action:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Schedules an action to be executed.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">func</span> <span class="n">scheduleRelative</span><span class="o">&lt;</span><span class="kt">StateType</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">state</span><span class="p">:</span> <span class="kt">StateType</span><span class="p">,</span> <span class="nv">dueTime</span><span class="p">:</span> <span class="kt"><a href="../Other%20Typealiases.html#/s:7RxSwift0A12TimeIntervala">RxTimeInterval</a></span><span class="p">,</span> <span class="nv">action</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">StateType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Protocols/Disposable.html">Disposable</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Protocols/Disposable.html">Disposable</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>state</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>State passed to the action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>dueTime</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Relative time after which to execute the action.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>action</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>The disposable object used to cancel the scheduled action (best effort).</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:7RxSwift28SerialDispatchQueueSchedulerC16schedulePeriodic_10startAfter6period6actionAA10Disposable_px_0D00D12TimeIntervalOAKxxctlF"></a>
                    <a name="//apple_ref/swift/Method/schedulePeriodic(_:startAfter:period:action:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:7RxSwift28SerialDispatchQueueSchedulerC16schedulePeriodic_10startAfter6period6actionAA10Disposable_px_0D00D12TimeIntervalOAKxxctlF">schedulePeriodic(_:<wbr>startAfter:<wbr>period:<wbr>action:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Schedules a periodic piece of work.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="n">schedulePeriodic</span><span class="o">&lt;</span><span class="kt">StateType</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">state</span><span class="p">:</span> <span class="kt">StateType</span><span class="p">,</span> <span class="nv">startAfter</span><span class="p">:</span> <span class="kt"><a href="../Other%20Typealiases.html#/s:7RxSwift0A12TimeIntervala">RxTimeInterval</a></span><span class="p">,</span> <span class="nv">period</span><span class="p">:</span> <span class="kt"><a href="../Other%20Typealiases.html#/s:7RxSwift0A12TimeIntervala">RxTimeInterval</a></span><span class="p">,</span> <span class="nv">action</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">StateType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">StateType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Protocols/Disposable.html">Disposable</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>state</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>State passed to the action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>startAfter</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Period after which initial work should be run.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>period</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Period for running the work periodically.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>action</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Action to be executed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>The disposable object used to cancel the scheduled action (best effort).</p>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2021 <a class="link" href="https://github.com/ReactiveX/RxSwift" target="_blank" rel="external">Krunoslav Zaher</a>. All rights reserved. (Last updated: 2021-04-21)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
